// const NAMESPACE = 'mooc';

function init (namespace) {
    let NAMESPACE = namespace;
    return {
        getClassSet: function () {
            let arg = [].slice.call(arguments);
            return ` ${NAMESPACE}-${arg.join('-')} `
        },

        reduceClassSet: function () {
            let args = [].slice.call(arguments);
            return args.map(function (arg) {
                return `${NAMESPACE}-${arg}`
            }).join(' ')
        },

        ifFunction: function (condition, a, b) {
            return condition ? a : b;
        }
    }
}

export default init('mooc')
